Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Simplify nx task graph #1333

Merged
merged 7 commits into from
Nov 12, 2023
Merged

Simplify nx task graph #1333

merged 7 commits into from
Nov 12, 2023

Conversation

lantua
Copy link
Collaborator

@lantua lantua commented Nov 10, 2023

Describe your changes

House cleaning on nx graph.

Barring unique tasks, we should have 4 main "stages": serve, build, genFile, load-dm.

  • build <- genFile <- load-dm
  • serve <- genFile <- load-dm

TODO list:

  • do not make serve depend on build
  • Eliminate pipeline task (should all be genFile
  • rename genFile to gen-file
  • document all the main tasks, as well as the nx structure in a wiki/readme

Issue or discord link

Resolves #1325

Testing/validation

Updated build
image

Updated serve
image

Updated wiki:
https://github.com/frzyc/genshin-optimizer/wiki/Notes-on-nx-configuration

Checklist before requesting a review (leave this PR as draft if any part of this list is not done.)

  • I have commented my code, in hard-to understand areas.
  • I have made corresponding changes to README or wiki.
  • For front-end changes, I have updated the corresponding English translations.
  • Ran yarn run mini-ci locally to validate format + lint.
  • If there were format issues, I ran nx format write to resolve them automatically.

@lantua
Copy link
Collaborator Author

lantua commented Nov 10, 2023

Note: for sanity check, nx serve frontend should still work even from a clean repo.

Copy link
Contributor

github-actions bot commented Nov 10, 2023

[frontend] [Fri Nov 10 01:20:40 UTC 2023] - Building version 138f4c6

[gi-frontend] [Fri Nov 10 01:20:59 UTC 2023] - Building version 138f4c6

[sr-frontend] [Fri Nov 10 01:21:07 UTC 2023] - Building version 138f4c6

[frontend] [Fri Nov 10 01:22:48 UTC 2023] - Deployed 138f4c6 to https://genshin-optimizer-prs.github.io/pr/1333/frontend (Takes 3-5 minutes after this completes to be available)

[sr-frontend] [Fri Nov 10 02:32:16 UTC 2023] - Building version d6dfc5f

[gi-frontend] [Fri Nov 10 02:32:25 UTC 2023] - Building version d6dfc5f

[frontend] [Fri Nov 10 02:32:26 UTC 2023] - Building version d6dfc5f

[sr-frontend] [Fri Nov 10 02:33:24 UTC 2023] - Deployed d6dfc5f to https://genshin-optimizer-prs.github.io/pr/1333/sr-frontend (Takes 3-5 minutes after this completes to be available)

[gi-frontend] [Fri Nov 10 02:34:54 UTC 2023] - Deployed d6dfc5f to https://genshin-optimizer-prs.github.io/pr/1333/gi-frontend (Takes 3-5 minutes after this completes to be available)

[frontend] [Fri Nov 10 02:35:22 UTC 2023] - Deployed d6dfc5f to https://genshin-optimizer-prs.github.io/pr/1333/frontend (Takes 3-5 minutes after this completes to be available)

[frontend] [Fri Nov 10 03:59:20 UTC 2023] - Building version 2d0c534

[sr-frontend] [Fri Nov 10 03:59:36 UTC 2023] - Building version 2d0c534

[gi-frontend] [Fri Nov 10 04:00:02 UTC 2023] - Building version 2d0c534

[sr-frontend] [Fri Nov 10 04:00:39 UTC 2023] - Deployed 2d0c534 to https://genshin-optimizer-prs.github.io/pr/1333/sr-frontend (Takes 3-5 minutes after this completes to be available)

[frontend] [Fri Nov 10 04:01:30 UTC 2023] - Deployed 2d0c534 to https://genshin-optimizer-prs.github.io/pr/1333/frontend (Takes 3-5 minutes after this completes to be available)

[gi-frontend] [Fri Nov 10 04:04:14 UTC 2023] - Deployed 2d0c534 to https://genshin-optimizer-prs.github.io/pr/1333/gi-frontend (Takes 3-5 minutes after this completes to be available)

[sr-frontend] [Sun Nov 12 02:58:59 UTC 2023] - Building version f55c6b2

[gi-frontend] [Sun Nov 12 02:59:13 UTC 2023] - Building version f55c6b2

[frontend] [Sun Nov 12 02:59:18 UTC 2023] - Building version f55c6b2

[sr-frontend] [Sun Nov 12 03:00:07 UTC 2023] - Deployed f55c6b2 to https://genshin-optimizer-prs.github.io/pr/1333/sr-frontend (Takes 3-5 minutes after this completes to be available)

[frontend] [Sun Nov 12 03:02:13 UTC 2023] - Deployed f55c6b2 to https://genshin-optimizer-prs.github.io/pr/1333/frontend (Takes 3-5 minutes after this completes to be available)

[gi-frontend] [Sun Nov 12 03:02:31 UTC 2023] - Deployed f55c6b2 to https://genshin-optimizer-prs.github.io/pr/1333/gi-frontend (Takes 3-5 minutes after this completes to be available)

[Sun Nov 12 05:27:16 UTC 2023] - Deleted deployment

@lantua
Copy link
Collaborator Author

lantua commented Nov 10, 2023

Add some wiki on the current nx task graph structure:
https://github.com/frzyc/genshin-optimizer/wiki/Notes-on-nx-configuration

@lantua lantua requested a review from frzyc November 10, 2023 03:23
Copy link
Owner

@frzyc frzyc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

serve doesn't run gen-file nor load-dm when it should. (empty task graph from nx graph)
image

@lantua lantua requested a review from frzyc November 10, 2023 04:01
Copy link
Owner

@frzyc frzyc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I mean, it works, but to run a dev server, you are building production first, that makes no sense right? The ideal would be serve -> gen-file -> load-dm and not serve ->build -> gen-file -> load-dm
image

@frzyc frzyc requested a review from nguyentvan7 November 12, 2023 02:59
@frzyc frzyc merged commit 8bf0b9c into master Nov 12, 2023
6 checks passed
@frzyc frzyc deleted the dep_graph branch November 12, 2023 05:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Simplify nx task graph
3 participants